{% macro gen_table(drafts, current_user, kwargs) %}
    <table id="each-table"
           class="table table-bordered table-hover table-condensed table-striped">
        <thead>
        <tr>
            <th>序号</th>
            <th>产品类型</th>
            <th>是否新增</th>
            <th>品牌</th>
            <th>产品名称</th>
            <th>审核状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for each in drafts %}
            <tr>
                <td>{{ loop.index }}</td>
                <td>{{ each.product_type_name }}</td>
                <td>{% if each.is_for_new %}是{% else %}否{% endif %}</td>
                <td>{{ each.product_info.brand }}</td>
                <td>{{ each.product_info.name }}</td>
                <td>{{ each.status_display }}</td>
                <td>
                    <a
                            class="btn btn-group btn-xs btn-primary"
                            href="{{ url_for('product_bp.product_draft_info', draft_id=each.id) }}"
                            name="user-info"
                            target="_self"
                    >详情</a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endmacro %}
